#ifndef KBestParseForest2O_H
#define KBestParseForest2O_H
#include"ParseForestItem.h"
#include"KBestParseForest2OGrandChildren.h"

class KBestParseForest2O : public KBestParseForest2OGrandChildren{
protected:
	virtual int getKey(int g, int s, int t, int dir, int comp, int k);

	virtual vector<pair<FeatureVector*, string*> >* getBestParses_strict(DependencyInstance *inst, DependencyPipe *pipe, vector<vector<vector<double> > > &probs,
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs,
		vector<vector<vector<vector<double> > > > &nt_probs, bool labeled);

	virtual vector<pair<FeatureVector*, string*> >* getBestParses_normal(DependencyInstance *inst, DependencyPipe *pipe, vector<vector<vector<double> > > &probs,
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs,
		vector<vector<vector<vector<double> > > > &nt_probs, bool labeled);
public:
	KBestParseForest2O(int start, int end, DependencyInstance &inst, int K);

	virtual string* getDepString(ParseForestItem &pfi);
	
	virtual vector<pair<FeatureVector*, string*> >* getBestParses(DependencyInstance *inst, DependencyPipe *pipe, vector<vector<vector<double> > > &probs,
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs,
		vector<vector<vector<vector<double> > > > &nt_probs, bool labeled, bool normal);

	virtual ~KBestParseForest2O();
};
#endif
